// 获取当前时间
export const GetItem = () => {
  let date = new Date();
  let y = date.getFullYear(); //获取完整的年份(4位)
  let M = date.getMonth() + 1; //获取当前月份(0-11,0代表1月)
  let d = date.getDate(); //获取当前日(1-31)
  let h = date.getHours(); //获取当前小时数(0-23)
  let m = date.getMinutes(); //获取当前分钟数(0-59)
  let s = date.getSeconds(); //获取当前秒数(0-59)
  return `${y}年${M < 10 ? '0' + M : M}月${d < 10 ? '0' + d : d}日 ${h}:${m < 10 ? '0' + m : m}:${s < 10 ? '0' + s : s}`;
}

// 事件戳转换成当前时间
export const ItemChange = (timestamp) => {
  var date = new Date(timestamp);
  var Y = date.getFullYear() + '-';
  var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
  var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
  var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
  var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
  var s = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());

  let strDate = `${Y}${M}${D}   ${h}${m}${s}`;
  return strDate;
}

// 面包屑匹配侧边栏
export let MenuList = () => {
  return {
    "商品列表": ['sub2', '5'],
    "商品组": ['sub2', '6'],
    "分类管理": ['sub2', '7'],
    "品牌管理": ['sub2', '8'],
    "设置": ['sub2', '9'],
    "订单概述": ['sub3', '10'],
    "订单状态": ['sub3', '11'],
    "维权管理": ['sub3', '12'],
    "工具": ['sub3', '13'],
    "积分明细": ['sub4', '14'],
    "余额明细": ['sub4', '15'],
    "对账单管理": ['sub4', '16'],
    "充值记录": ['sub4', '17'],
    "基本功能": ['sub5', '18'],
    "优惠券管理": ['sub5', '19'],
    "会员列表": ['sub6', '20'],
    "会员概述": ['sub6', '21'],
    "会员等级": ['sub6', '22'],
    "分组设置": ['sub6', '23'],
    "秒杀管理": ['sub7', '24'],
    "拼团管理": ['sub7', '25'],
    "商城列表": ['sub8', '26'],
    "轮播图管理": ['sub8', '27'],
    "分类管理": ['sub8', '28'],
    "状态管理": ['sub8', '29'],
    "门店管理": ['sub9', '30'],
    "管理员管理": ['sub9', '31'],
    "体现审核": ['sub9', '32'],
    "角色管理": ['sub9', '33'],
    "查看评价详情": ['sub10', '34'],
    "审核评价": ['sub10', '35'],
    "回复评价": ['sub10', '36'],
    "意见反馈": ['sub11', '37'],
    "合作申请": ['sub11', '38'],
    "用药问答": ['sub11', '39'],
  }
}